415件ヒット
[401-415件を表示]
(0.042秒)
別のキーワード
ライブラリ
- ビルトイン (139)
-
irb
/ cmd / load (12) - json (24)
- resolv (36)
- rss (132)
-
rubygems
/ config _ file (12) -
rubygems
/ source _ index (12) -
rubygems
/ spec _ fetcher (24) - win32ole (12)
クラス
- Binding (7)
-
Encoding
:: Converter (60) -
Encoding
:: InvalidByteSequenceError (36) -
Gem
:: ConfigFile (12) -
Gem
:: SourceIndex (12) -
Gem
:: SpecFetcher (24) -
IRB
:: ExtendCommand :: Source (12) -
JSON
:: Parser (12) - Method (12)
- Module (12)
-
RDoc
:: Options (12) -
RSS
:: Maker :: ItemsBase :: ItemBase (48) -
RSS
:: TrackBackModel10 :: TrackBackAbout (24) -
RSS
:: TrackBackModel10 :: TrackBackPing (24) -
Resolv
:: DNS :: Resource :: IN :: WKS (12) -
Resolv
:: DNS :: Resource :: MINFO (24) - UnboundMethod (12)
-
WIN32OLE
_ TYPE (12)
モジュール
キーワード
- bitmap (12)
- categories (12)
-
const
_ source _ location (12) - convert (12)
-
dc
_ source (12) -
dc
_ source= (12) -
dc
_ sources (12) -
default
_ event _ sources (12) -
destination
_ encoding (12) - emailbx (12)
- enclosure (12)
- execute (12)
-
fetch
_ spec (12) - guid (12)
-
inline
_ source (12) - inspect (6)
-
load
_ specs (12) - parse (12)
-
primitive
_ convert (48) - resource (24)
- resource= (24)
- rmailbx (12)
-
source
_ encoding (12) -
source
_ encoding _ name (12) -
source
_ location (19) -
to
_ json _ raw _ object (12) -
to
_ s (6) - update (12)
-
update
_ sources (12)
検索結果
-
JSON
:: Parser # parse -> object (107.0) -
現在のソースをパースして結果を Ruby のオブジェクトとして返します。
...パースして結果を Ruby のオブジェクトとして返します。
//emlist[例][ruby]{
require 'json'
class Person
attr_accessor :name, :age
def []=(key, value)
instance_variable_set("@#{key}", value)
end
end
parser = JSON::Parser.new(DATA.read, object_class: Person)
person =......parser.parse
person.class # => Person
person.name # => "tanaka"
person.age # => 20
__END__
{
"name":"tanaka",
"age":20
}
//}
@see JSON::Parser#source... -
Method
# inspect -> String (25.0) -
self を読みやすい文字列として返します。
...下の形式の文字列を返します。
#<Method: klass1(klass2)#method(arg) foo.rb:2> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス/モジュール名です......rb:2」は Method#source_location を表します。
source_location が nil の場合には付きません。
//emlist[例][ruby]{
module Foo
def foo
"foo"
end
end
class Bar
include Foo
def bar(a, b)
end
end
p Bar.new.method(:foo) # => #<Method: Bar(Foo)#foo() test.rb:2>
p Ba......r.new.method(:bar) # => #<Method: Bar#bar(a, b) test.rb:8>
//}
klass1 と klass2 が同じ場合は以下の形式になります。
#<Method: klass1#method() foo.rb:2> (形式2)
特異メソッドに対しては、
#<Method: obj.method() foo.rb:2> (形式3)... -
Method
# to _ s -> String (25.0) -
self を読みやすい文字列として返します。
...下の形式の文字列を返します。
#<Method: klass1(klass2)#method(arg) foo.rb:2> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス/モジュール名です......rb:2」は Method#source_location を表します。
source_location が nil の場合には付きません。
//emlist[例][ruby]{
module Foo
def foo
"foo"
end
end
class Bar
include Foo
def bar(a, b)
end
end
p Bar.new.method(:foo) # => #<Method: Bar(Foo)#foo() test.rb:2>
p Ba......r.new.method(:bar) # => #<Method: Bar#bar(a, b) test.rb:8>
//}
klass1 と klass2 が同じ場合は以下の形式になります。
#<Method: klass1#method() foo.rb:2> (形式2)
特異メソッドに対しては、
#<Method: obj.method() foo.rb:2> (形式3)...